home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / ArchiveUtils / JumpBack / Source / TarControl.m < prev    next >
Encoding:
Text File  |  1995-06-12  |  2.0 KB  |  95 lines

  1.  
  2. //======================================================================
  3. //
  4. //    Portions written by FreemanSoft Inc.
  5. //
  6. //    FreemanSoft disclaims any warranty of any kind, expressed or implied,
  7. //    as to this source code's fitness for any particular use.
  8. //
  9. //    For more information, use the following electronic mail addresses:
  10. //     
  11. //        info@FreemanSoft.com    general questions
  12. //        support@FreemanSoft.com    technical questions
  13. //
  14. //======================================================================
  15.  
  16.  
  17. /* Written by
  18.  *    Joe Freeman    jfreeman@next.com    
  19.  *    RdistControl
  20.  *
  21.  *    This code has no warranty.  
  22.  *    It is provided so that the consumer may maintain and modify it
  23.  *    at their own risk.  Use this code at your own risk.
  24.  */
  25.  
  26. #import "TarControl.h"
  27. #import "DragView.h"
  28. #import "Subprocess.h"
  29. #import "pathutil.h"
  30. #import "common.h"
  31. #import "tarControl.h"        // strings entries
  32.  
  33. #import "JumpBackControl.h"
  34.  
  35.  
  36. /*================================================================
  37.  *    Private methods 
  38.  *================================================================*/
  39.  
  40. @implementation TarControl
  41.  
  42.     
  43.  
  44. - (const char *)buttonImageName
  45. {
  46.     return "tar_CD.tiff";
  47. }
  48.  
  49. - (const char *)buttonAltImageName
  50. {
  51.     return "tar_CD_abort.tiff";
  52. }
  53.  
  54. - (const char *)stringsTable
  55. {
  56.     return "tarControl";
  57. }
  58.  
  59. - free
  60. {
  61.     [[NXApp delegate] dropDragJumpBackController:self];
  62.     return [super free];
  63. }
  64.     
  65. - runPassOne:sender
  66. {
  67.     /* is no pass one for this app */
  68.     return nil;
  69. }
  70.  
  71.  
  72.     
  73. - runPassTwo:sender
  74. {    
  75.     char buf[4096];
  76.     char feathersPath[1024];
  77.     
  78.     canContinue = YES;
  79.     [self setState:PASS_2_RUNNING];
  80.     [self logIt:start_pass_2_string];
  81.     [[NXBundle mainBundle] getPath: feathersPath
  82.             forResource:tar_executable ofType:""];
  83.     sprintf(buf, pass_2_run_string, 
  84.         sPathList, feathersPath, basename(sPathList), dPathList, feathersPath);
  85.     subprocessObj = [Subprocess new:buf
  86.                 withDelegate:self
  87.                 andPtySupport:NO
  88.                 andStdErr:YES];
  89.     [subprocessObj terminateInput];
  90.     return self;
  91. }
  92.  
  93.  
  94. @end
  95.